package com.example.demo.generator.scaffold.dto.stats;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * 统计查询请求。
 */
public class ScaffoldStatsQueryRequest {

    private List<ScaffoldStatsDimension> groupBy = new ArrayList<>();

    private String moduleName;

    private String basePackage;

    private String moduleBasePath;
    private Long userId;



    private Boolean enableBlockchain;

    private Integer minChainFields;

    private Integer maxChainFields;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    public List<ScaffoldStatsDimension> getGroupBy() {
        return groupBy;
    }

    public void setGroupBy(List<ScaffoldStatsDimension> groupBy) {
        this.groupBy = groupBy != null ? groupBy : new ArrayList<>();
    }

    public String getModuleName() {
        return moduleName;
    }

    public void setModuleName(String moduleName) {
        this.moduleName = moduleName;
    }

    public String getBasePackage() {
        return basePackage;
    }

    public void setBasePackage(String basePackage) {
        this.basePackage = basePackage;
    }

    public String getModuleBasePath() {
        return moduleBasePath;
    }

    public void setModuleBasePath(String moduleBasePath) {
        this.moduleBasePath = moduleBasePath;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Boolean getEnableBlockchain() {
        return enableBlockchain;
    }

    public void setEnableBlockchain(Boolean enableBlockchain) {
        this.enableBlockchain = enableBlockchain;
    }

    public Integer getMinChainFields() {
        return minChainFields;
    }

    public void setMinChainFields(Integer minChainFields) {
        this.minChainFields = minChainFields;
    }

    public Integer getMaxChainFields() {
        return maxChainFields;
    }

    public void setMaxChainFields(Integer maxChainFields) {
        this.maxChainFields = maxChainFields;
    }

    public LocalDateTime getStartTime() {
        return startTime;
    }

    public void setStartTime(LocalDateTime startTime) {
        this.startTime = startTime;
    }

    public LocalDateTime getEndTime() {
        return endTime;
    }

    public void setEndTime(LocalDateTime endTime) {
        this.endTime = endTime;
    }
}

